//
//  PatrolListTableViewCell.m
//  SafeFoodManagerDemo
//
//  Created by bob on 2017/11/13.
//  Copyright © 2017年 bob. All rights reserved.
//

#import "PatrolListTableViewCell.h"

@implementation PatrolListTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.moneyLab.hidden = YES;
    
}

-(void)setDeleStatue:(BOOL)deleStatue
{
    _deleStatue=deleStatue;
    
//    if (deleStatue) {
//
//        self.editImageView.hidden=NO;
//
//        self.accessoryType=UITableViewCellAccessoryNone;
//
//    }else{
//
//        self.editImageView.hidden=YES;
//
//        self.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
//
//    }
    
}

//招聘信息
- (void)setRecruitdata:(RecruitData *)recruitdata
{
    _recruitdata = recruitdata;
    
    self.NameLabel.text=recruitdata.name;
    
    self.ContentLabel.text=recruitdata.addDate;
    
    self.moneyLab.hidden = NO;
    self.moneyLab.text = recruitdata.salary;
    
    if (self.deleStatue) {
        
        self.ContentLabel.numberOfLines=1;
        
        if (recruitdata.Seleclt) {
            self.editImageView.image=[UIImage imageNamed:@"Select"];
        }else{
            self.editImageView.image=[UIImage imageNamed:@"UnSelect"];
        }
        
    }else{
        self.ContentLabel.numberOfLines=1;
        self.editImageView.image=[UIImage imageNamed:@"groupA"];
    }
}

-(void)setData:(PatrolListData *)Data
{
    _Data=Data;
    
    self.NameLabel.text=Data.logName;
    
    self.ContentLabel.text=Data.content;
    
    if (self.deleStatue) {
        
         self.ContentLabel.numberOfLines=1;
        
        if (Data.Seleclt) {
            self.editImageView.image=[UIImage imageNamed:@"Select"];
        }else{
            self.editImageView.image=[UIImage imageNamed:@"UnSelect"];
        }
        
    }else{
    
        if (Data.isOpen) {
            
            self.editImageView.image=[UIImage imageNamed:@"loginarrorup"];
            self.ContentLabel.numberOfLines=0;
            
        }else{
            self.editImageView.image=[UIImage imageNamed:@"loginarror"];
            self.ContentLabel.numberOfLines=1;
        }
    }
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
